package ar.uba.fi.tonyvaliente.text.extraction;

import java.util.LinkedList;

import org.htmlparser.Node;
import org.htmlparser.Text;

public class TextExtractor implements NodeExtractor {

	@Override
	public LinkedList<String> extract(Node node) {
		if (node instanceof Text)
			return extract((Text) node);
		else
			return new LinkedList<String>();
	}

	private LinkedList<String> extract(Text node) {
		LinkedList<String> result = new LinkedList<String>();
		result.add(node.getText());
		return result;
	}
}
